package shell.view
{
	import modules.hero.view.component.HeroModule;
	
	import org.robotlegs.utilities.modular.mvcs.StarlingModuleMediator;
	
	import shell.view.components.ShellRootView;
	
	import starling.events.Event;
	import starling.events.EventDispatcher;
	
	public class ShellModuleMediator extends StarlingModuleMediator
	{
		[Inject]
		public var viewLayers:ShellRootView;
		
		public function ShellModuleMediator()
		{
			super();
		}
		
		override protected function cleanUp():void
		{
			
		}
		
		override public function onRegister():void
		{
			addViewListener("addPlz", onGoAndAdd);
		}
		
		private function onGoAndAdd(event:Event):void
		{
			var heroModule:HeroModule = new HeroModule();
			heroModule.x = 200;
			heroModule.y = 200;
			viewLayers.sceneLayer.addChild(heroModule);
		}
	}
}